package com.yuerlive.rainbow.api;

import com.yuerlive.rainbow.API;
import com.yuerlive.rainbow.entity.BaseData;
import com.yuerlive.rainbow.entity.User;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by xiaoyi on 2017/5/23.
 */

public interface LoginService {
    @FormUrlEncoded
    @POST(API.SEND_SMS_CODE)
    Observable<BaseData> sendSmsCode(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST(API.LOGIN)
    Observable<BaseData<User>> login(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST(API.COMPLETE_INFO)
    Observable<BaseData> completeInfo(@FieldMap Map<String ,String> params);

    @FormUrlEncoded
    @POST(API.USER_EDIT)
    Observable<BaseData> getEditRequest(@FieldMap Map<String ,String> params);

    @FormUrlEncoded
    @POST(API.THIRD_LOGIN)
    Observable<BaseData<User>> thirdLogin(@FieldMap Map<String,String> params);
}
